<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <mate name="flexibel" content="initial-drl=1"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title>支付页</title>
    <script> (function(designWidth, maxWidth) {
            var doc = document,
            win = window,
            docEl = doc.documentElement,
            remStyle = document.createElement("style"),
            tid;

            function refreshRem() {
                var width = docEl.getBoundingClientRect().width;
                maxWidth = maxWidth || 540;
                width>maxWidth && (width=maxWidth);
                var rem = width * 100 / designWidth;
                remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
            }

            if (docEl.firstElementChild) {
                docEl.firstElementChild.appendChild(remStyle);
            } else {
                var wrap = doc.createElement("div");
                wrap.appendChild(remStyle);
                doc.write(wrap.innerHTML);
                wrap = null;
            }
            //要等 wiewport 设置好后才能执行 refreshRem，不然 refreshRem 会执行2次；
            refreshRem();

            win.addEventListener("resize", function() {
                clearTimeout(tid); //防止执行两次
                tid = setTimeout(refreshRem, 300);
            }, false);

            win.addEventListener("pageshow", function(e) {
                if (e.persisted) { // 浏览器后退的时候重新计算
                    clearTimeout(tid);
                    tid = setTimeout(refreshRem, 300);
                }
            }, false);

            if (doc.readyState === "complete") {
                doc.body.style.fontSize = "16px";
            } else {
                doc.addEventListener("DOMContentLoaded", function(e) {
                    doc.body.style.fontSize = "16px";
                }, false);
            }
        })(750, 750);</script>
    <!--[if lt IE 9]>  
        <script src="http://cdn.bootcss.com/html5shiv/r29/html5.js"></script>
        <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>    
    <![endif]-->
    <style>
    *{margin:0;padding:0;}
    .container{
        background: #fff;
        width:100%;
        height:auto;
        min-height: 100%;
        position:relative;
        overflow:hidden;
        margin:0 auto;
        color: #333;
    }
    .wrapper{
        margin: 0.3rem;
    }
    .pay-desc p{
        margin-bottom: 0.2rem;
        color: #a5a5a5;
    }
    .btn-group{list-style: none;}
    .btn-group a{
        margin: 0.2rem 0;
        display: block;
        background: #E79D54;
        height: 0.8rem;
        line-height: 0.8rem;
        text-align: center;
        border-radius: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        color: #fff;
        text-decoration: none;
    }
    .btn-group a.border-yellow{
        background: #fff;
        border: 1px solid #E79D54;
        color: #E79D54;
    }
    .icon-linghit{
        width:1.4rem;
        margin: 0 auto;
    }
    .icon-linghit img{
        display: block;
        width:100%;
        margin-bottom: 0.3rem;
    }
    </style>
</head>
<body>

        <script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
        <script>

            setTimeout(function(){
                WeixinJSBridge.invoke(
                        'getBrandWCPayRequest', {
                            "appId":"<!--{$appId}-->",     //公众号名称，由商户传入
                            "timeStamp":"<!--{$timeStamp}-->",         //时间戳，自1970年以来的秒数
                            "nonceStr":"<!--{$nonceStr}-->", //随机串
                            "package":"<!--{$package}-->",
                            "signType":"<!--{$signType}-->",         //微信签名方式：
                            "paySign":"<!--{$paySign}-->" //微信签名
                        },
                        function(res){
                            if(res.err_msg == "get_brand_wcpay_request:ok" ) {
                                location.href="<!--{$cburl}-->&ordernum=<!--{$Think.cookie.orderid}-->";
                            }     // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回    ok，但并不保证它绝对可靠。
                        }
                );
            },1000);

        </script>
</div>
</body>
</html>